package com.gxa.xc.rbac.interceptor;

import com.gxa.xc.rbac.Service.impl.MenuSerivce;
import com.gxa.xc.rbac.pojo.Admin;
import com.gxa.xc.rbac.pojo.Premission;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.ArrayList;
import java.util.List;

public class PremissinInterceptor implements HandlerInterceptor {

    @Autowired
    private MenuSerivce menuSerivce;

    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        if(menuSerivce.isSuper(request.getSession())){
            return true;
        }
        String url=request.getServletPath();
        List<Premission> premissionList=new ArrayList<>();

        return false;
    }


}
